/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package gob.inamhi.entidades;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author dhinojosa
 */
@Entity
@Table(name = "prpm", schema="administrative")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Prpm.findAll", query = "SELECT p FROM Prpm p"),
    @NamedQuery(name = "Prpm.findByPrpmId", query = "SELECT p FROM Prpm p WHERE p.prpmId = :prpmId"),
    @NamedQuery(name = "Prpm.findByPrpmoper", query = "SELECT p FROM Prpm p WHERE p.prpmoper = :prpmoper"),
    @NamedQuery(name = "Prpm.findByPrpmdeci", query = "SELECT p FROM Prpm p WHERE p.prpmdeci = :prpmdeci"),
    @NamedQuery(name = "Prpm.findByPrpminte", query = "SELECT p FROM Prpm p WHERE p.prpminte = :prpminte"),
    @NamedQuery(name = "Prpm.findByPrpmhorc", query = "SELECT p FROM Prpm p WHERE p.prpmhorc = :prpmhorc"),
    @NamedQuery(name = "Prpm.findByPrpmpaso", query = "SELECT p FROM Prpm p WHERE p.prpmpaso = :prpmpaso"),
    @NamedQuery(name = "Prpm.findByPrpmporc", query = "SELECT p FROM Prpm p WHERE p.prpmporc = :prpmporc"),
    @NamedQuery(name = "Prpm.findByPrpmfnte", query = "SELECT p FROM Prpm p WHERE p.prpmfnte = :prpmfnte"),
    @NamedQuery(name = "Prpm.findByPrpmdest", query = "SELECT p FROM Prpm p WHERE p.prpmdest = :prpmdest"),
    @NamedQuery(name = "Prpm.findByPrpmesta", query = "SELECT p FROM Prpm p WHERE p.prpmesta = :prpmesta")})
public class Prpm implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
//    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "prpm__id")
    private Integer prpmId;
    @Size(max = 200)
    @Column(name = "prpmoper")
    private String prpmoper;
    @Column(name = "prpmdeci")
    private Integer prpmdeci;
    @Size(max = 200)
    @Column(name = "prpminte")
    private String prpminte;
    @Size(max = 20)
    @Column(name = "prpmhorc")
    private String prpmhorc;
    @Size(max = 20)
    @Column(name = "prpmpaso")
    private String prpmpaso;
    @Column(name = "prpmporc")
    private Integer prpmporc;
    @Size(max = 200)
    @Column(name = "prpmfnte")
    private String prpmfnte;
    @Size(max = 200)
    @Column(name = "prpmdest")
    private String prpmdest;
    @Column(name = "prpmesta")
    private Boolean prpmesta;
    @JoinColumn(name = "esta__id", referencedColumnName = "esta__id")
    @ManyToOne
    private Esta estaId;
    @JoinColumn(name = "coparesu", referencedColumnName = "copa__id")
    @ManyToOne
    private Copa coparesu;
    @JoinColumn(name = "copa__id", referencedColumnName = "copa__id")
    @ManyToOne
    private Copa copaId;
    @JoinColumn(name = "cfges__id", referencedColumnName = "cfges__id")
    @ManyToOne
    private Cfges cfgesId;

    public Prpm() {
    }

    public Prpm(Integer prpmId) {
        this.prpmId = prpmId;
    }

    public Integer getPrpmId() {
        return prpmId;
    }

    public void setPrpmId(Integer prpmId) {
        this.prpmId = prpmId;
    }

    public String getPrpmoper() {
        return prpmoper;
    }

    public void setPrpmoper(String prpmoper) {
        this.prpmoper = prpmoper;
    }

    public Integer getPrpmdeci() {
        return prpmdeci;
    }

    public void setPrpmdeci(Integer prpmdeci) {
        this.prpmdeci = prpmdeci;
    }

    public String getPrpminte() {
        return prpminte;
    }

    public void setPrpminte(String prpminte) {
        this.prpminte = prpminte;
    }

    public String getPrpmhorc() {
        return prpmhorc;
    }

    public void setPrpmhorc(String prpmhorc) {
        this.prpmhorc = prpmhorc;
    }

    public String getPrpmpaso() {
        return prpmpaso;
    }

    public void setPrpmpaso(String prpmpaso) {
        this.prpmpaso = prpmpaso;
    }

    public Integer getPrpmporc() {
        return prpmporc;
    }

    public void setPrpmporc(Integer prpmporc) {
        this.prpmporc = prpmporc;
    }

    public String getPrpmfnte() {
        return prpmfnte;
    }

    public void setPrpmfnte(String prpmfnte) {
        this.prpmfnte = prpmfnte;
    }

    public String getPrpmdest() {
        return prpmdest;
    }

    public void setPrpmdest(String prpmdest) {
        this.prpmdest = prpmdest;
    }

    public Boolean getPrpmesta() {
        return prpmesta;
    }

    public void setPrpmesta(Boolean prpmesta) {
        this.prpmesta = prpmesta;
    }

    public Esta getEstaId() {
        return estaId;
    }

    public void setEstaId(Esta estaId) {
        this.estaId = estaId;
    }

    public Copa getCoparesu() {
        return coparesu;
    }

    public void setCoparesu(Copa coparesu) {
        this.coparesu = coparesu;
    }

    public Copa getCopaId() {
        return copaId;
    }

    public void setCopaId(Copa copaId) {
        this.copaId = copaId;
    }

    public Cfges getCfgesId() {
        return cfgesId;
    }

    public void setCfgesId(Cfges cfgesId) {
        this.cfgesId = cfgesId;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (prpmId != null ? prpmId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Prpm)) {
            return false;
        }
        Prpm other = (Prpm) object;
        if ((this.prpmId == null && other.prpmId != null) || (this.prpmId != null && !this.prpmId.equals(other.prpmId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "gob.inamhi.entidades.Prpm[ prpmId=" + prpmId + " ]";
    }
    
}
